import com.baomidou.mybatisplus.generator.FastAutoGenerator;
import com.baomidou.mybatisplus.generator.config.OutputFile;
import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine;

import java.util.Collections;

public class MyAuto {
    public static void main(String[] args) {
        FastAutoGenerator.create("jdbc:mysql://47.92.121.76:3306/wish-account?useUnicode=true&characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true&useSSL=false",
                "root", "cloud123.").
                globalConfig((builder) -> {
            builder.author("wish").fileOverride().
                    outputDir("E:\\workspaceidea\\1911A\\wish\\wish-modules\\wish-account\\src\\main\\java\\");
        }).packageConfig((builder) -> {
            builder.parent("com.wish.g3.account").
                    pathInfo(Collections.
                            singletonMap(OutputFile.mapperXml, "E:\\workspaceidea\\1911A\\wish\\wish-modules\\wish-account\\src\\main\\resources\\mapper\\"));
        }).strategyConfig((builder) -> {
            builder.addTablePrefix("t_");
        }).templateEngine(new FreemarkerTemplateEngine()).execute();
    }
}
